﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RedmineToolBar.Model
{


    public class Status
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class Tracker
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class CustomField
    {
        public string value { get; set; }
        public string name { get; set; }
        public int id { get; set; }
    }

    public class AssignedTo
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class Project
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class Author
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class Priority
    {
        public string name { get; set; }
        public int id { get; set; }
    }

    public class Issue
    {
        public string updated_on { get; set; }
        public int done_ratio { get; set; }
        public Status status { get; set; }
        public Tracker tracker { get; set; }
        public List<CustomField> custom_fields { get; set; }
        public string subject { get; set; }
        public string start_date { get; set; }
        public string description { get; set; }
        public string created_on { get; set; }
        public AssignedTo assigned_to { get; set; }
        public Project project { get; set; }
        public Author author { get; set; }
        public int id { get; set; }
        public Priority priority { get; set; }
        public string due_date { get; set; }
        public double estimated_hours { get; set; }
    }

    public class RootObject
    {
        public List<Issue> issues { get; set; }
        public int total_count { get; set; }
        public int limit { get; set; }
        public int offset { get; set; }
    }

    public enum RedmineFields
    {
        project = 1,
        id = 2,
        tracker = 3,
        priority = 4,
        created_on = 5,
        status = 6,
        subject = 7,
        assigned_to = 8,
        start_date = 9,
        estimated_hours = 10,
        due_date = 11,
        done_ratio = 12,
        author = 13,
        updated_on = 14, 
        description = 15
    }



}
